fix(agent-org): guard runtime submission during deletion - #657
Draft
ShiboSheng wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agent Org root and worker sessions can be reactivated while their root conversation is being deleted. Runtime initialization and work submission are reached through several paths, while ordinary SDE sessions must not pay for Agent Org leases or persistent fence queries. Per-entry checks alone leave a race between admission, runtime installation, and deletion.
Solution
startingrun status.Potential risks
.husky/_/husky.sh; the commit was created with a one-commandcore.hooksPath=/dev/nulloverride after the equivalent verification was run manually.Architecture and performance audit
process_message, and queued turn/maintenance work converges onDialogScheduler::enqueue.Verification
cargo test -p agent_core --lib core::coordination::agent_org_runs -- --nocapture(66 passed)cargo test -p agent_core --lib core::session::scheduler(6 passed)cargo test -p agent_core --lib state::commands::session::message(20 passed)cargo test -p agent_core --lib core::coordination::agent_org_watchdog(9 passed)cargo test -p agent_core --lib(3,190 passed, 0 failed, 2 ignored)cargo check -p org2 --libcargo check -p e2e-testcargo run -p e2e-test -- --list(both new scenarios listed)cargo run -p e2e-test -- --scenario agent-org-runtime-submission-fence-production-commandcargo run -p e2e-test -- --scenario ordinary-sde-agent-org-isolation-production-commandcargo clippy -p agent_core --lib -- -D warnings; stopped by seven existingorgtrack_corewarnings outside this diff.cargo clippy -p e2e-test --bin e2e-test -- -D warnings; same seven existingorgtrack_corewarnings.cargo clippy -p agent_core --lib --no-deps -- -D warnings; thirteen existingagent_corewarnings, all outside this diff.cargo fmt -p agent_core -p e2e-test -- --check; reports only untouched Plan Approval, Shell Replay, and skills-loader files.rustfmt --check --config skip_children=truegit diff --checkDiff accounting